package com.smart.model.dtomapper;

import com.smart.model.domain.OperatePermissionDO;
import com.smart.model.request.OperatePermissionRequest;
import com.smart.model.vo.OperatePermissionVO;
import com.smart.model.vo.OperateTreePermissionVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface OperatePermissionDtoMapper {

    OperatePermissionDtoMapper INSTANCE = Mappers.getMapper(OperatePermissionDtoMapper.class);

    /**
    * DO to VO
    * @param operatePermissionDO
    * @return
    */
    OperatePermissionVO do2VO(OperatePermissionDO operatePermissionDO);

    /**
     * DO to VO
     * @param operatePermissionDO
     * @return
     */
    OperateTreePermissionVO do2TreeVO(OperatePermissionDO operatePermissionDO);

    /**
     * reuest to DO
     * @param operatePermissionDO
     * @return
     */
    OperatePermissionDO request2DO(OperatePermissionRequest operatePermissionDO);
}
